package org.corey.wyp.vo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "month_setting")
public class MonthSetting implements Serializable,Cloneable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	@Column(name = "YEAR")
	private int year;
	@Column(name = "MONTH")
	private int month;
	@Column(name = "MONTH_INCOMING")
	private float monthIncoming;
	@Column(name = "ROOM_OUT")
	private float roomOut;
	@Column(name = "FOOD_FUND")
	private float foodFund;
	@Column(name = "FUN_FUND")
	private float funFund;
	@Column(name = "TRAFFIC_FUND")
	private float trafficFund;
	@Column(name = "LIVING_FUND")
	private float livingFund;
	@Column(name = "WEAR_FUND")
	private float wearFund;
	@OneToOne(fetch = FetchType.EAGER,cascade={CascadeType.ALL})
	@JoinColumn(name="DAY_ID")
	private DaySetting daySetting;

	public MonthSetting() {
	}

	
	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public float getMonthIncoming() {
		return monthIncoming;
	}

	public void setMonthIncoming(float monthIncoming) {
		this.monthIncoming = monthIncoming;
	}

	public float getRoomOut() {
		return roomOut;
	}

	public void setRoomOut(float roomOut) {
		this.roomOut = roomOut;
	}

	public float getFoodFund() {
		return foodFund;
	}

	public void setFoodFund(float foodFund) {
		this.foodFund = foodFund;
	}

	public float getFunFund() {
		return funFund;
	}

	public void setFunFund(float funFund) {
		this.funFund = funFund;
	}

	public float getTrafficFund() {
		return trafficFund;
	}

	public void setTrafficFund(float trafficFund) {
		this.trafficFund = trafficFund;
	}

	public float getLivingFund() {
		return livingFund;
	}

	public void setLivingFund(float livingFund) {
		this.livingFund = livingFund;
	}

	public DaySetting getDaySetting() {
		return daySetting;
	}

	public void setDaySetting(DaySetting daySetting) {
		this.daySetting = daySetting;
	}

	public float getWearFund() {
		return wearFund;
	}

	public void setWearFund(float wearFund) {
		this.wearFund = wearFund;
	}


	@Override
	public Object clone() throws CloneNotSupportedException {
		MonthSetting cloneObject=new MonthSetting();
		cloneObject.setFoodFund(this.foodFund);
		cloneObject.setFunFund(this.funFund);
		cloneObject.setLivingFund(this.livingFund);
		cloneObject.setMonthIncoming(this.monthIncoming);
		cloneObject.setRoomOut(this.roomOut);
		cloneObject.setTrafficFund(this.trafficFund);
		cloneObject.setWearFund(this.wearFund);
		return cloneObject;
	}
}
